﻿/**
 * @file InpNastranWriterHelper.h
 * @brief the helper of interpreting bdf
 * @author shenzhuowei (2931275006@qq.com)
 * @date 2025-03-03
 */
#ifndef INP_NASTRAN_WRITER_HELPER_H
#define INP_NASTRAN_WRITER_HELPER_H

#include "FITKNastranBDFWriter.h"

#include "FITK_Component/FITKAbaqusData/FITKAbaqusPart.h"
#include "FITK_Component/FITKAbaqusData/FITKDataCase.h"
#include "FITK_Interface/FITKInterfaceStructural/FITKAbaMeshPartVTK.h"

#include <QMap>

namespace Nastran
{
/**
 * @brief bdf文件写入帮助类
 * @author shenzhuowei (2931275006@qq.com)
 * @date 2025-03-03
 */
class InpNastranWriterHelper
{
  public:
    /**
     * @brief Constructor for InpNastranWriterHelper, initializes member variables.
     * @param [i] caseData Pointer to AbaqusData::FITKDataCase, containing the analysis case data.
     * @author shenzhuowei (2931275006@qq.com)
     * @date 2025-03-03
     */
    explicit InpNastranWriterHelper(AbaqusData::FITKDataCase *caseData);
    /**
     * @brief Destory
     * @author shenzhuowei (2931275006@qq.com)
     * @date 2025-03-03
     */
    ~InpNastranWriterHelper();

    /**
     * @brief 设置实际的写入器实例
     * @param[in] reader Pointer to the FITKNastranBDFReader object.
     * @author shenzhuowei (2931275006@qq.com)
     * @date 2025-03-03
     */
    void setWriter(FITKNastranBDFWriter *writer);

  private:
    /**
     * @brief 算例数据
     * @author shenzhuowei (2931275006@qq.com)
     * @date 2025-03-03
     */
    AbaqusData::FITKDataCase *_caseData{};

    /**
     * @brief group information
     * @author shenzhuowei (2931275006@qq.com)
     * @date 2025-03-03
     */
    QMap<int, QList<int>> _groupingInfo{};

    /**
     * @brief BDF文件写入器
     * @author shenzhuowei (2931275006@qq.com)
     * @date 2025-03-03
     */
    FITKNastranBDFWriter *_writer{};
};
} // namespace Nastran
#endif
